/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package utility.com;

import javax.swing.JComboBox;
import javax.swing.JOptionPane;

/**
 *
 * @author jay
 */
public class InputValidation {
    
    public static Boolean isValid(final java.awt.Component component, Boolean condition, String msg) {
        if (!condition) {
            component.requestFocus();
            JOptionPane.showMessageDialog(component.getParent(), msg, "Warning", JOptionPane.WARNING_MESSAGE);
        }
        return condition;
    }
}
